import 'dart:async';
import 'dart:ui';

class Debounce {
  Timer? _timer;

  void setDuration(Duration duration, VoidCallback callback) {
    _timer?.cancel();
    _timer = Timer(duration, callback);
  }

  clear() {
    _timer?.cancel();
  }
}
